Repository navigation
test(math): add Liouville function complexity analysis (R50-T039) - #77
Open
nishadaniket174 wants to merge 1 commit into
Open
nishadaniket174 wants to merge 1 commit into
nishadaniket174 wants to merge 1 commit into
Conversation
nishadaniket174
force-pushed
the
student/e26b07f0789/R50-T039
branch
from
November 21, 2026 14:33
94946f9 to
afe9ed8
Compare
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds complexity analysis, empirical performance measurements, and regression tests for
liouvilleFunctioninMaths/LiouvilleFunction.js.The implementation calculates the Liouville function λ(n) based on the total number of prime factors, counted with multiplicity. This contribution documents its complexity and verifies correctness across different input sizes.
Changes Made
Maths/test/LiouvilleFunction.test.jswith explicit fixtures:1→1.12→-1.1,000,000→1.999,983→-1.work/R50-T039/experiment.jsfor deterministic complexity and scaling measurements using fixed-seed inputs, five repetitions per size, and median/range reporting.work/R50-T039/check.pyto automate focused tests, the complexity experiment, deliberate mutation verification, and the full repository test suite.Testing and Verification
The following checks passed:
npx vitest run Maths/test/LiouvilleFunction.test.js(106 tests passed).node work/R50-T039/experiment.jscompleted successfully.npm test(347 test files passed, 12,027 tests passed).npm run check-stylepassed.Run the complete task-specific verification using:
Related Issue
Closes #39
Task: R50-T039
Target file:
Maths/LiouvilleFunction.jsFunction:
liouvilleFunctionAll task-specific evidence and benchmark results are maintained under
work/R50-T039/.